package com.soft.face.global;

import lombok.Data;

@Data
public class BusinessException extends Exception {

    private Integer code = ErrorCodeEnum.SYSTEM_ERROR.getCode();

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(ErrorCodeEnum codeEnum) {
        super(codeEnum.getMessage());
        this.code = codeEnum.getCode();
    }
}
